]> dgit.raspbian.org Git - linux-4.9.git/commit
mac80211: fix MU-MIMO follow-MAC mode
authorJohannes Berg <johannes.berg@intel.com>
Thu, 13 Apr 2017 12:23:49 +0000 (14:23 +0200)
committerpopcornmix <popcornmix@gmail.com>
Fri, 28 Apr 2017 14:43:48 +0000 (15:43 +0100)
commitfe97f3329d55f2211b6f6d57a249f06714cdb9c8
tree5a3d872f611181607a19ec55abcf286583a3437e
parentf60e66f9ba976d207e6ae8999a99b13b7db8703a
mac80211: fix MU-MIMO follow-MAC mode

commit 9e478066eae41211c92a8f63cc69aafc391bd6ab upstream.

There are two bugs in the follow-MAC code:
 * it treats the radiotap header as the 802.11 header
   (therefore it can't possibly work)
 * it doesn't verify that the skb data it accesses is actually
   present in the header, which is mitigated by the first point

Fix this by moving all of this out into a separate function.
This function copies the data it needs using skb_copy_bits()
to make sure it can be accessed if it's paged, and offsets
that by the possibly present vendor radiotap header.

This also makes all those conditions more readable.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/rx.c